package com.xiaoy.core.database.form.server;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springside.modules.orm.Page;

import com.xiaoy.core.database.form.dao.ViewDao;
import com.xiaoy.core.database.form.entity.View;

@Service
public class ViewService {

	@Resource
	private ViewDao viewDao;
	
	public Page<View>filterPage (Page page) {
		return viewDao.findPage(page, page.getFilters());
	}
	
	public void save (View view) {
		viewDao.save(view);
	}
	
	public View byId (long id) {
		
		return viewDao.get(id);
	}
}


